<div class="questions index">
	<h2><?php __('Preguntas disponibles para prueba');?></h2>
	<table cellpadding="0" cellspacing="0">
	<tr>
			
			<th><?php echo $this->Paginator->sort('Pregunta');?></th>
			<th><?php echo $this->Paginator->sort('Módulo');?></th>
			<th class="actions"><?php __('Operaciones');?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($questions as $question):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $this->Html->link($question['Question']['text'], array('controller' => 'questions', 'action' => 'view', $question['Question']['id'])); ?>
		</td>
		
		<td>
			<?php echo $this->Html->link($question['Topic']['title'], array('controller' => 'topics', 'action' => 'view', $question['Topic']['id'])); ?>
		</td>
		<td class="actions">
		
	<!--	<?php echo $this->Html->link($this->Html->image("edit-button.gif",array('alt'=>'image')),array('action' => 'edit', $question['Question']['id']),array('escape'=>false));?>
	-->
			
			<?php echo $this->Html->link(__('Editar', true), array('action' => 'edit', $question['Question']['id'])); ?>
			<?php echo $this->Html->link(__('Eliminar', true), array('action' => 'delete', $question['Question']['id']), null, sprintf(__('Está seguro que desea eliminar la pregunta  %s?', true), $question['Question']['text'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('{:page} / {:pages}')));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('Anterior', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('Siguiente', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>
<div class="actions">
	<h3><?php __('Acciones'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Nueva Pregunta', true), array('action' => 'add')); ?></li>
		<li><?php echo $this->Html->link(__('Listar Módulos', true), array('controller' => 'topics', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Nuevo Módulo', true), array('controller' => 'topics', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('Listar Respuestas', true), array('controller' => 'choices', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Nueva Respuesta', true), array('controller' => 'choices', 'action' => 'add')); ?> </li>
	</ul>
</div>
